<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="viewUser">
    <template class="data">
        <el-input
                style="width:30%;margin-bottom: 10px;color: blue"
                placeholder="请输入搜索内容"
                v-model="query"
                @change="search"
                clearable>
        </el-input>
        <el-table
                :data="tableData"
                border
                style="width: 100%">
            <el-table-column
                    prop="cid"
                    label="课程ID"
                    width="120">
            </el-table-column>
            <el-table-column
                    prop="name"
                    label="课程名"
                    width="120">
            </el-table-column>
            <el-table-column
                    prop="type"
                    label="课程类型"
                    width="120">
            </el-table-column>
            <el-table-column label="操作" width="180" >
                <template slot-scope="scope">
                    <el-button type="primary" size="small" icon="el-icon-edit"   circle @click="update(scope.row.id)" ></el-button>
                    <el-button type="danger"  size="small" icon="el-icon-delete" circle @click="deleteUser(scope.row.id)" ></el-button>
                </template>
            </el-table-column>
        </el-table>
        <!--分页-->
        <el-pagination
                :current-page="current"
                :page-size="limit"
                :total="total"
                style="padding:30px 0; margin-top:20px; text-align: center;"
                layout="prev, pager, next"
                @current-change="getUserList"></el-pagination>
    </template>
</div>
</body>
</html>